package JavaBase.分支结构;

import java.util.Scanner;
public class Tax {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double income = sc.nextDouble();
		double tax = 0;
		if (income < 2000){
			System.out.println("不用交税");
			return;
		}

		double taxedIncome = income - 2000;
		if (taxedIncome <= 500){
			tax = taxedIncome * 0.05;
		}else if (taxedIncome <= 2000){
			tax = (taxedIncome - 500) * 0.1 + 500 * 0.05;
		}else if (taxedIncome <= 5000){
			tax = (taxedIncome - 2000)* 0.15 + 1500 * 0.1 + 500 * 0.05;
		}else if (taxedIncome <= 20000){
			tax = (taxedIncome - 5000) * 0.2 + 3000* 0.15 + 1500 * 0.1 + 500 * 0.05;
		}else if (taxedIncome <= 40000){
			tax = (taxedIncome - 20000)*0.25 + 15000 * 0.2 + 3000* 0.15 + 1500 * 0.1 + 500 * 0.05;
		}else if (taxedIncome <= 60000){
			tax = (taxedIncome - 40000)*0.3 + 20000 * 0.25 + 15000 * 0.2 + 3000* 0.15 + 1500 * 0.1 + 500 * 0.05;
		}else if (taxedIncome <= 80000){
			tax = (taxedIncome - 60000) * 0.35 + 20000 * 0.3 + 20000 * 0.25 + 15000 * 0.2 + 3000* 0.15 + 1500 * 0.1 + 500 * 0.05;
		}else if (taxedIncome <= 100000){
			tax = (taxedIncome - 80000) * 0.4 + 20000 * 0.35 + 20000 * 0.3 + 20000 * 0.25 + 15000 * 0.2 + 3000* 0.15 + 1500 * 0.1 + 500 * 0.05;
		}else{
			tax = (taxedIncome - 100000)* 0.45 + 20000 * 0.4 + 20000 * 0.35 + 20000 * 0.3 + 20000 * 0.25 + 15000 * 0.2 + 3000* 0.15 + 1500 * 0.1 + 500 * 0.05;
		}

		System.out.println(tax);
	}
}
